<?php
/**
 * Created by PhpStorm.
 * User: cephei
 * Date: 11/24/15
 * Time: 2:54 PM
 */
use Core\PluginContainer;

require_once 'Core/Bootstrap.php';

//$db = PluginContainer::getInstance()->singletonMake('database');
//$db->initDB('127.0.0.1','root','root','jupiter');
//$db->initDB('127.0.0.1','root','root','jupiter');
//$pac = PluginContainer::getInstance()->make('pac');
//$content = $pac->getPACFile(0);
//file_put_contents("auto_mac.pac",$content);
//header("Content-type: application/x-ns-proxy-autoconfig");
//header("Content-Disposition:attachment;filename='auto.pac'");
//echo $content;

//
//$btd = PluginContainer::getInstance()->make('doubanfilm');
//$btd->fetchFilm();

//$thunder = PluginContainer::getInstance()->make('thunder');
//$thunder->keepLive();
//echo $thunder->addTask("magnet:?xt=urn:btih:d6b8034fc59ee6e6f86d0def8d2b02e8a5a5a887&dn=%5B%E7%94%B5%E5%BD%B1%E4%B8%8B%E8%BD%BDwww.qiqipu.com%5D2015%20%E7%81%AB%E6%98%9F%E6%95%91%E6%8F%B4%20The.Martian.HDTC%28%E4%B8%AD%E8%8B%B1%E5%AD%97%E5%B9%95%29.wmv",
//    "火星救援","TDDOWNLOAD","magnet","","");
//$thunder->getTaskList();

//$route = PluginContainer::getInstance()->singletonMake('route');
//$route->findWay($_SERVER);
//$route->checkRoutePoint('/cron/add?name=([a-z])&plugin=(.*?)&method=(.*?)','\\Plugin\\Cron\\Plugin_Cron@addCronTask');
//$route->registerWay('/cron/add?name=([a-z])&plugin=(.*?)&method=(.*?)','\\Plugin\\Cron\\Plugin_Cron@addCronTask');

//$deliverhub = PluginContainer::getInstance()->make('deliverhub');
//$deliverhub->sendMessage('mail',1,["title"=>"test","content"=>"","type"=>"HTML"]);

//$t = [
//    [
//        "doubanid"=>25864085
//    ],
//    [
//        "doubanid"=>25809384
//    ]
//];
//$dbfilm->sendRemind($t);
//$installer = PluginContainer::getInstance()->make('installer');
//$installer->installPlugin(ROOT_PATH.'/ZHanqiSign.zip',true);
$zhanqi = PluginContainer::getInstance()->make('zhanqisign');
$zhanqi->doSign();

//$cgw = PluginContainer::getInstance()->make('cgwsign');
//$cgw->doSign();
